package resource.controller;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import resource.service.UserService;

@Controller("userController2")
public class UserController {

//  根据名称进行注入 myUserService
//    @Resource(name = "myUserService")
//    private UserService userService;


//  根据类型配置  UserService
    @Resource
    private UserService userService;


    public void add() {
        System.out.println("controller执行");
    }
}